//
//  RGMePersonalInfoEditCell.m
//  RedGrass
//
//  Created by wuyine on 2018/12/14.
//  Copyright © 2018年 hongcaosp. All rights reserved.
//

#import "RGMePersonalInfoEditCell.h"

@interface RGMePersonalInfoEditCell()
@property (nonatomic,strong) UIImageView *arrow;
@end

@implementation RGMePersonalInfoEditCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.contentView.backgroundColor = [UIColor blackColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.title];
        [self.contentView addSubview:self.content];
        [self.contentView addSubview:self.arrow];
        
        [_title mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.mas_equalTo(15);
            make.centerY.mas_equalTo(0);
            make.width.mas_equalTo(50);
        }];
        
        [_arrow mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(0);
            make.trailing.mas_equalTo(-15);
            make.size.mas_equalTo(CGSizeMake(7, 14));
        }];
        
        [_content mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(0);
            make.trailing.equalTo(self.arrow.mas_leading).offset(-10);
            make.left.mas_equalTo(self.title.mas_right).offset(10);
        }];
        
        
    }
    return self;
}

- (UILabel *)title {
    if (!_title) {
        _title = [[UILabel alloc] init];
        _title.textColor = UICOLOR_WITH_RGBINT(0xffffff);
        _title.font = FONT(customFontName, 15);
    }
    return _title;
}

- (UILabel *)content {
    if (!_content) {
        _content = [[UILabel alloc] init];
        _content.textColor = UICOLOR_WITH_RGBINT(0x999999);
        _content.font = FONT(customFontName, 15);
        _content.textAlignment = NSTextAlignmentRight;
    }
    return _content;
}

- (UIImageView *)arrow {
    if (!_arrow) {
        _arrow = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"设置_更多")];
    }
    return _arrow;
}
@end
